<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* div span{
            color: red;
        } */


        /* div > span{
            color: red;
        } */

        /* div,p,span{
            color: red;
        } */
         
            /* 交集选择器  */
        p.box{
            color: rgb(61, 225, 50);
        }
    </style>
</head>
<body>
    <span>span标签</span>
    <div>
        <span>
            儿子 span
        </span>
        <p>
            <span>
                孙子span
            </span>
        </p>
    </div>
    <p class="box">p标签</p>
    <span class="box">span标签</span>
</body>
</html>